<?php

namespace App\Admin\Actions\Grid\Tools;

use App\Admin\Forms\GoodLossForm;
use Dcat\Admin\Widgets\Modal;

class GoodLoss extends BaseTools
{
    protected $title = '增加商品损耗';


    public function render()
    {
        $form = GoodLossForm::make()->payload(['id' => $this->getKey()]);

        $button = <<<HTML
            <button style="cursor: pointer;" class="btn btn-danger"> <i class="feather icon-cloud"></i> 增加商品损耗</button>
        HTML;

        return Modal::make()
            ->lg()
            ->title($this->title)
            ->body($form)
            ->button($button);
    }
}
